package com.share.dao.sysmgr;

import java.util.LinkedHashMap;
import java.util.List;

import org.springframework.stereotype.Repository;

import com.share.bean.sysmgr.BackTreeMenu;
import com.share.commons.base.dao.BaseDaoSupport;

/**
 * 说明：后台管理树状菜单DAO接口实现
 * <br/>作者：杨浩泉
 * <br/>日期：2010-8-10
 */
@Repository
public class BackTreeMenuDoaImpl extends BaseDaoSupport<BackTreeMenu> implements BackTreeMenuDao{

	@Override
	public void deleteBackTreeMenuDao(BackTreeMenu tree) throws RuntimeException {
		this.deleteObject(tree) ;
	}

	@SuppressWarnings("unchecked")
	@Override
	public List<BackTreeMenu> findBackTreeMenuDao(String hql, String whereHQL, List<Object> param, LinkedHashMap<String, String> orderby) throws RuntimeException {
		
		return (List<BackTreeMenu>) this.find(hql, whereHQL, param, orderby) ;
	}

	@Override
	public BackTreeMenu loadBackTreeMenuDao(int id) throws RuntimeException {
		
		return this.getById(BackTreeMenu.class, id) ;
	}

	@Override
	public void saveBackTreeMenuDao(BackTreeMenu tree) throws RuntimeException {
		this.saveObject(tree) ;
		
	}

	@Override
	public void updateBackTreeMenuDao(BackTreeMenu tree) throws RuntimeException {
		this.updateObject(tree) ;
		
	}

}
